using BrainTechLLC;
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Collections;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Net.Sockets;

namespace Mud.EmlenMudMain
{
  public class LogEntry : EmlenMudEngine.ILogEntry
  {
    public void SetLogEntry(LogType ltype, Exception ex, string sz)
    {
      logType = ltype;
      exceptionMessage = (ex != null) ? (ex.ToString()) : "(none)";
      dtOccurred = DateTime.Now;
      logText = sz;
    }
    public LogType logType;
    public string exceptionMessage;
    public DateTime dtOccurred;
    public string logText;
  }

  public class MudStats : IMudStats 
  {
    public int maxSimultaneousConnection = 0;
    public int maxSimultaneousConnections { get { return maxSimultaneousConnection; } set { maxSimultaneousConnection = value; } }
    public Int64 bytesSent = 0;
    public Int64 bytesRecv = 0;

    public void AddBytesSent(Int64 nBytesSent)
    {
      Interlocked.Add(ref bytesSent, nBytesSent);
    }

    public void AddBytesReceived(Int64 nBytesRecv)
    {
      Interlocked.Add(ref bytesRecv, nBytesRecv);
    }
  }
}
